import request from '../utils/request'

/*移动端用户获取初始化信息*/
export const getInitInfo = () =>
	request({
		url: '/mobile/user/initInfo',
		method: 'GET'
	})

/*移动端获取信息*/
export const getUserInfo = () =>
	request({
		url: '/mobile/user/info',
		method: 'GET'
	})
/*移动端信息*/
export const postUserUpdateInfo = (data = {}) =>
	request({
		url: '/mobile/user/update/info',
		method: 'POST',
		data
	})


/*消息通知*/
export const getMessageList = () =>
	request({
		url: '/mobile/message/all/list',
		method: 'GET'
	})
/*未读消息通知*/
export const getUnreadMessageList = () =>
	request({
		url: '/mobile/message/unread/list',
		method: 'GET',
		noLoading: true
	})

/*查看消息*/
export const showMessage = (data = {}) => {
	return request({
		url: '/mobile/message/show',
		method: 'GET',
		data
	})
}

/*消息全部已读*/
export const MessageReadAll = (data = {}) => {
	return request({
		url: '/mobile/message/readAll',
		method: 'GET',
		data
	})
}

/*消息全部删除*/
export const MessageDeleteAll = (data = {}) => {
	return request({
		url: '/mobile/message/deleteAll',
		method: 'GET',
		data
	})
}

/* 实名认证 */
export const Certificate = (data = {}) => {
	return request({
		url: "/public/realNameAuth/realNameAuth",
		method: "GET",
		data,
	})
}

/* 获取实名认证信息 */
export const getCertificationInfo = (data = {}) => {
	return request({
		url: "/public/realNameAuth/realNameAuthDetails",
		method: "GET",
		data
	})
}

/* 修改用户类型 */
export const changeUserType = (data = {}) => {
	return request({
		url: "/public/mobile/gameTeam/changeUserType",
		method: "GET",
		data,
	})
}

/* 查询用户身份 */
export const queryUserRole = () => {
	return request({
		url: "/mobile/user/info",
		method: "GET",
	})
}